/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Negocio;

/**
 *
 * @author Estudiante
 */
public class Vector {
    public Entero[] vector;
    int dim;
    public int getDim() {
        return dim;
    }
    public void setDim(int d) {
        dim = d;
        vector = new Entero[dim];
    }
    public void ordenar(){
        for(int i =0; i<dim-1;i++){
            for(int j=i+1;j<dim;j++){
                if(vector[i].num>vector[j].num){
                    int aux= vector[i].num;
                    vector[i].num = vector[j].num;
                    vector[j].num=aux;
                }
            }
        }
    }
    public boolean existe(int n,int p){
        for(int i=0;i<p;i++)
            if(vector[i].num==n)
                return true;
        return false;
    }
}
